export default function(sequelize, DataTypes) {
    return sequelize.define('captcha', {
        _account: {
            type: DataTypes.STRING(10),
            allowNull: false,
            primaryKey: true
        },
        _code: {
            type: DataTypes.STRING(15),
            allowNull: false,
        },
        _timestamp: {
            type: DataTypes.STRING(15),
            allowNull: false,
            comment: "发送验证码的时间"
        },
    }, {
        sequelize,
        tableName: 'captcha',
        timestamps: false,
        indexes: [
            {
                name: "PRIMARY",
                unique: true,
                using: "BTREE",
                fields: [
                    { name: "_account" },
                ]
            },
        ]
    });
};
